﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using AccessControl.Contracts.Models;

namespace AccessControl.Data.Models
{
    /// <summary>
    /// Represents map in the system
    /// </summary>
    /// <remarks></remarks>
    public class Map : Model, IMap
    {
        #region Fields

        byte[] _MapImageBytes;
        ObservableCollection<IMapEntry> _Entries = new ObservableCollection<IMapEntry>();

        #endregion

        #region Public Properties

        /// <summary>
        /// Gets or sets the map image bytes.
        /// </summary>
        /// <value>
        /// The map image bytes.
        /// </value>
        public byte[] MapImageBytes
        {
            get { return _MapImageBytes; }
            set
            {
                if (_MapImageBytes != value)
                {
                    _MapImageBytes = value;
                    NotifyPropertyChanged("MapImageBytes");
                }
            }
        }

        /// <summary>
        /// Gets the entries.
        /// </summary>
        public IList<IMapEntry> Entries
        {
            get { return _Entries; }
        }

        #endregion
    }
}
